package thread.heima.a04threadmethod1;

public class ThreadDemo {
    public static void main(String[] args) throws InterruptedException {
        MyThread t1 = new MyThread("飞机");
        MyThread t2 = new MyThread("坦克");
        t1.start();
        t2.start();
        Thread t = Thread.currentThread();
        String name = t.getName();
        System.out.println("name = " + name);
        System.out.println("111111111111111111111");
        Thread.sleep(5000);
        System.out.println("222222222222222222222");
    }
}
